<%--
    Document   : IniciarSesion
    Created on : 27-abr-2011, 18:58:43
    Author     : cabarcas
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean id="model" class="com.baratongoweb.model.WebModel" scope="session"/>
<%@page session="true" errorPage="PaginaError.jsp"%>

<%

    model.init(application);
    HttpSession sesion= request.getSession();
    request=(HttpServletRequest)pageContext.getRequest();
    String url=request.getContextPath();
    String controller=url+"/controladores";
    

    
    Object id=sesion.getAttribute("id");
    
    if(id ==null){
            
    

%>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<title>ABASTOS</title>
<link href="<%=url%>/css/stylesheet.css" rel="stylesheet" type="text/css" media="all" />
<style type="text/css">
 p.MsoNormal
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	}
</style>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="0" style="height: 239px; width: 940px;">
          <tr>
               <td width="560">
			<table border="0" cellspacing="0" cellpadding="0" style="width: 939px; height: 159px;">
              <tr>
                <td align="left" valign="top" style="height: 253px; width: 556px;">
				<img src="img/Logo1.png"  width="937" height="253" ></td></tr>
              <tr>
              <a href=MenuPrincipal.jsp" class="menu_text">INICIO
                  <td style="white-space:pre; width: 556px;" align="left" valign="middle" class="menu_box"> <a href="<%=url%>/MenuPrincipal.jsp" class="menu_text">INICIO</a>   <a href="<%=url%>/IniciarSesion.jsp" class="menu_text">Iniciar Sesión</a> </td>
              </tr>
            </table></td>
      </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="body_table">
          <tr>
            <td class="news_text"   align="left" valign="top" bgcolor="#EFEFEF"><table width="200" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td style="padding:11px; border-bottom:2px solid #FFF; " align="center" valign="top">
				<table border="1" cellspacing="0" cellpadding="0" style="width: 182px">
                    <tr>
                      <td align="left"><strong>Nuevo</strong></td>
                    </tr>
                    <tr>
                      <td  style="padding-top:10px; text-align:justify;" align="left"><strong style="text-decoration:underline;">07.11.2011</strong><br />
                        Nam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, varius<br />
                        <br />
                        <strong style="text-decoration:underline;">07.11.2011</strong><br />
                        Nam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, varius<br />
                        <br />
                        <strong style="text-decoration:underline;">07.11.2011</strong><br />
Nam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, variusNam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, varius</td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="center" valign="top"><img src="img/map.jpg" alt="" width="112" height="63" /></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="center" valign="top"><a href="#link.html" class="orange_link">
					Ubicacion</a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
            <td style="padding:12px;" align="left" valign="top">
			<table border="0" cellspacing="0" cellpadding="0" style="width: 345px; height: 198px;">
              <tr>
                <td align="left" valign="top">
				<table width="100%" border="1" cellspacing="0" cellpadding="0" style="height: 187px">

                  <tr>
                    <td align="center" valign="top" style="width: 584px">
					<img src="img/Login.png" width="74"> <br><br>
                                        <form action="<%=controller%>/Iniciar/Sesion" method="post" id="consultar">
                                            <label id="Label1">Usuario:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </label><input name="usuario" type="text" /><br/><br/>
                                            <label id="Label2">Contrase&#241;a:&nbsp;&nbsp; </label><input name="id" type="password" /><br/><br/>
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <input name="Button1" type="submit" value="Iniciar sesion" />
                                        </form>
					<br />

					</td>
                  </tr>
               </table>
				</td>
              </tr>
                          </table></td>
          </tr>
        </table></td>
      </tr>
        <td align="left" valign="top">
		<table border="0" cellspacing="0" cellpadding="0" style="width: 940px">
          <tr>
            <td align="center" valign="middle" bgcolor="#669900" style="border-top:2px solid #FF9900; padding-left:20px; font-size:11px; font-family:Verdana, Arial, Helvetica, sans-serif;"> ABASTOS Y FERRETERIA BATONGO<br />
PASACABALLOS Calle 15 #918<br />
              Cartagena<br />
			</td>
<!--
We request you retain the full web design copyright notice below including the link to http://www.sarkis-webdesign.com
This not only gives respect to the large amount of time given freely by the designer but also helps build interest, traffic and use of template. If you cannot (for good reason) retain the full design copyright we request you at least leave in place the image Web designer - Sarkis, with linked to http://www.sarkis-webdesign.com. Good luck!

Web designer Sarkis
// -->
                      </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<%}else{

    Integer car=(Integer)sesion.getAttribute("cargo");
    int cargo=car.intValue();

        if(cargo==1){
            response.sendRedirect(url+"/AdminInicio.jsp");
        }else
            if(cargo==2){
                response.sendRedirect(url+"/VistaClientes.jsp");
            }
   }
    %>
